/*
 * @Author: 李小晴 2689279066@qq.com
 * @Date: 2023-02-23 10:46:35
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-06-13 21:14:40
 * @FilePath: \zhmc_pc\sys\src\api\sp\pasture\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 列表
export const zcParkListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcParkList',
      data: data
    }
  })
}
// 新增
export const zcParkAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcParkAddAdmin',
      data: data
    }
  })
}
// 查看
export const zcParkSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcParkSee',
      data: data
    }
  })
}
// 编辑
export const zcParkEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcParkEdit',
      data: data
    }
  })
}
// 删除
export const zcParkDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcParkDel',
      data: data
    }
  })
}

// 关联园区修改
export const zcPastureEditParkApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcPastureEditPark',
      data: data
    }
  })
}
